import request from '@/utils/request'
import axios from 'axios'
// 查询萤石Token
export const getYSTokenApi = (data) =>
  axios.post('https://open.ys7.com/api/lapp/token/get', data, {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
  })

// 查询乐橙Token
export const getLCTokenApi = (data) =>
  request.post('/biz-microservice-energy/camera/token/lcToken', data)

// 查询海康Token
export const getHKTokenApi = (data) =>
  request.post('/biz-microservice-energy/camera/token/hkToken', data)

// 查询token列表信息
export const getVideoListApi = (data) =>
  request.post('/biz-microservice-energy/camera/token/list', data)

// 保存视频配置信息
export const saveVideoListApi = (data) =>
  request.post('/biz-microservice-energy/camera/token/save', data)

// 获取视频接入方式下拉框
export const getVideoTypeSelectApi = () =>
  request.get('/core/dictionary/combo-item/list?dictType=CAMERA_JRFS')

// 删除视频接入方式下拉框
export const delVideoListApi = (key) =>
  request.post(`/biz-microservice-energy/camera/token/delete?key=${key}`)
